package com.xqy.service;

import com.xqy.fallback.UserServiceFallBack;
import com.xqy.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Component
@FeignClient(value = "SPRINGCLOUD-PROVIDER-USER",fallbackFactory = UserServiceFallBack.class)
public interface FeignClientUserService {
    @GetMapping("/list")
    public List<User> queryList();
    @GetMapping("/get")
    public User getUser(Integer userId);
    @GetMapping("/test")
    public String getTest();

}
